import 'braft-editor/dist/index.css';
import React from 'react';
import BraftEditor from 'braft-editor';

class FormDemo extends React.Component {
  render() {
    const controls = [
      'bold',
      'italic',
      'underline',
      'text-color',
      'separator',
      'link',
      'separator',
      'emoji',
    ];
    const { formChange } = this.props;

    return (
      <div className="demo-container">
        <BraftEditor
          className="my-editor"
          controls={controls}
          placeholder="请输入商品描述"
          onChange={e => formChange('goodsCd', e.toHTML())}
        />
      </div>
    );
  }
}

export default FormDemo;
